#ifndef __SOCK_H__
#define __SOCK_H__

#include <sys/socket.h>
#include <arpa/inet.h>
#include "Log.h"
#include <netinet/in.h>

class Sock
{
public:
    static int Socket();

    static bool Bind(int sock, uint16_t port, std::string ip = "0.0.0.0");

    static bool Listen(int sock);

    static int Accept(int sock,struct sockaddr_in *clientaddr);

    static bool Connect(int sock, std::string serverip, uint16_t serverport);

private:
};

#endif